<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('名称');
            $table->string('ie')->comment('产品IEMI');
            $table->string('ic')->comment('产品SIM编号');
            $table->integer('area_id')->comment('区域编号');
            $table->decimal('lat', 9, 6)->nullable()->comment('经度');
            $table->decimal('lng', 9, 6)->nullable()->comment('纬度');
            $table->integer('status')->default(1)->comment('是否启用');
            $table->integer('sort')->default(0)->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
}
